package com.muchfish.reactor.api;
import reactor.core.publisher.Flux;

public class ReactorDoOnNextExample {
    public static void main(String[] args) {
        Flux<Integer> source = Flux.range(1, 3);

        // 在每个元素发出时执行附加操作
        source.doOnNext(value -> System.out.println("Processing: " + value))
                .subscribe(System.out::println);
    }
}
